package com.JustTest;

import redis.clients.jedis.HostAndPort;
import redis.clients.jedis.JedisCluster;

import java.util.HashSet;
import java.util.Set;

public class App3 {
    public static void main(String[] args) {
        Set<HostAndPort> hostAndPorts = new HashSet<>();
        hostAndPorts.add(new HostAndPort("127.0.0.1",6379));
        hostAndPorts.add(new HostAndPort("127.0.0.1",6380));
        JedisCluster cluster = new JedisCluster(hostAndPorts);
        String test = cluster.get("masterslavetest");
        System.out.println(test);
    }
}
